package com.crape.faq.bo;

import java.util.List;

import com.crape.common.exceptions.BOException;
import com.crape.common.model.Question;

public interface IQuestionBO {
	
	List<Question> searchQuestions(String searchValue, Integer startIndex, Integer pageSize) throws BOException;

	Long countSearchQuestions(String searchValue) throws BOException;

	List<Question> getQuestions(Question question) throws BOException;

	Question getQuestionById(Long id) throws BOException;

	List<Question> getPagedQuestions(Integer startIndex, Integer pageSize) throws BOException;

	Long countPageQuestions() throws BOException;

	List<Question> getPagedQuestionsByAccountid(Long accountid, Integer startIndex, Integer pageSize) throws BOException;

	Long countPageQuestionsByAccountid(Long accountid) throws BOException;

	List<Question> getOther10Questions(Long questionid) throws BOException;

	List<Question> getHotQuestions() throws BOException;

	Long countAnswerQuestionsByAccountid(Long accountid) throws BOException;

	List<Question> getPagedAnswerQuestionsByAccountid(Long accountid, Integer startIndex, Integer pageSize) throws BOException;
	
	Long countFollowedQuestionsByAccountid(Long accountid) throws BOException;
	
	List<Question> getPagedFollowedQuestionsByAccountid(Long accountid, Integer startIndex, Integer pageSize) throws BOException;

	void updateQuestion(Question question) throws BOException;

	void addQuestion(Question question) throws BOException;
	
	void addQuestionAttention(Long accountid, Long questionid);
	
	void cancelQuestionAttention(Long accountid, Long questionid);
	
	Long countQuestionRefByQuestionid(Long questionid) throws BOException;

}
